
#import "SEGUgcListModel.h"
@implementation SEGUgcListModel
- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
-(instancetype)init
{
    self = [super init];
    if (self) {
        _userId = @"";
        _objType = @"";
        _time = @"";
        _operatorType = @"";
        _title = @"";
        _shareId = @"";
        _sharePicture = @"";
        _unitName = @"";
        _picture = @[];
        _communityName = @"";
        _communityId = @"";
        _shareTitle = @"";
        _rentUnit = @"";
        _objId = @"";
        _rent = @"";
        _marketType = @"";
        _isChange = @"";
        _deposit = @"";
        _marketPrice = @"";
        _quizTypeId = @"";
        _cityId = @"";
        _commentCount = @"";
        _salePrice = @"";
        _praiseCount = @"";
        _marketStatus = @"";
        _isShare = @"";
        _content = @"";
        _isPraise = @"";
        _pgcType = @"";
        _year = @"";
        _month = @"";
        _day = @"";
        _channelId = @"";
        _channelName = @"";
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}
- (void)setValue:(id)value forKey:(NSString*)key
{
    if ([key isEqualToString:@"picture"]) {
        if ([value isKindOfClass:[NSArray class]]) {
            NSMutableArray* _arrM = [NSMutableArray array];
            NSMutableArray* _arrM2 = [NSMutableArray array];
            for (NSString* str in value) {
                [_arrM addObject:str];
                [_arrM2 addObject:[NSString stringWithFormat:@"%@%@",kClientImageRootURL,str]];
            }
            _picture = _arrM.copy;
            _picturesArray = _arrM2.copy;
        }
    }
    [super setValue:value forKey:key];
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{}
- (void)setUserId:(NSString*)userId{
    _userId = [[SEGUtils ValueToString:userId]copy];
}
- (void)setObjType:(NSString*)objType{
    _objType = [[SEGUtils ValueToString:objType]copy];
}
- (void)setTime:(NSString*)time{
    _time = [[SEGUtils ValueToString:time] copy];
    NSString *timeStr = [SEGUtils stringDateByFormatString:kTimeFormatStringDay withDate:[NSDate dateWithTimeIntervalSince1970:[time doubleValue]]];
    _year = [NSString stringWithFormat:@"%@年",[timeStr substringToIndex:4]];
    NSString *month = [timeStr substringWithRange:NSMakeRange(5, 2)];
    NSArray *monthArray = @[@"一月",@"二月",@"三月",@"四月",@"五月",@"六月",@"七月",@"八月",@"九月",@"十月",@"十一月",@"十二月"];
    _month = monthArray[[month integerValue] - 1];
    _day = [[timeStr substringFromIndex:8] copy];
}
- (void)setOperatorType:(NSString*)operatorType{
    _operatorType = [[SEGUtils ValueToString:operatorType]copy];
}
- (void)setTitle:(NSString*)title{
    _title = [[SEGUtils ValueToString:title]copy];
}
- (void)setShareId:(NSString*)shareId{
    _shareId = [[SEGUtils ValueToString:shareId]copy];
}
- (void)setSharePicture:(NSString*)sharePicture{
    _sharePicture = [[SEGUtils ValueToString:sharePicture]copy];
}
- (void)setUnitName:(NSString*)unitName{
    _unitName = [[SEGUtils ValueToString:unitName]copy];
}
//- (void)setPicture:(NSString*)picture{
//    _picture = [picture copy];
//}
- (void)setCommunityName:(NSString*)communityName{
    _communityName = [[SEGUtils ValueToString:communityName]copy];
}
- (void)setCommunityId:(NSString*)communityId{
    _communityId = [[SEGUtils ValueToString:communityId]copy];
}
- (void)setShareTitle:(NSString*)shareTitle{
    _shareTitle = [[SEGUtils ValueToString:shareTitle]copy];
}
- (void)setRentUnit:(NSString*)rentUnit{
    _rentUnit = [[SEGUtils ValueToString:rentUnit]copy];
}
- (void)setObjId:(NSString*)objId{
    _objId = [[SEGUtils ValueToString:objId]copy];
}
- (void)setRent:(NSString*)rent{
    _rent = [[SEGUtils ValueToString:rent]copy];
}
- (void)setMarketType:(NSString*)marketType{
    _marketType = [[SEGUtils ValueToString:marketType]copy];
}
- (void)setIsChange:(NSString*)isChange{
    _isChange = [[SEGUtils ValueToString:isChange]copy];
}
- (void)setDeposit:(NSString*)deposit{
    _deposit = [[SEGUtils ValueToString:deposit]copy];
}
- (void)setMarketPrice:(NSString*)marketPrice{
    _marketPrice = [[SEGUtils ValueToString:marketPrice]copy];
}
- (void)setQuizTypeId:(NSString*)quizTypeId{
    _quizTypeId = [[SEGUtils ValueToString:quizTypeId]copy];
}
- (void)setCityId:(NSString*)cityId{
    _cityId = [[SEGUtils ValueToString:cityId]copy];
}
- (void)setCommentCount:(NSString*)commentCount{
    _commentCount = [[SEGUtils ValueToString:commentCount]copy];
}
- (void)setSalePrice:(NSString*)salePrice{
    _salePrice = [[SEGUtils ValueToString:salePrice]copy];
}
- (void)setPraiseCount:(NSString*)praiseCount{
    _praiseCount = [[SEGUtils ValueToString:praiseCount]copy];
}
- (void)setMarketStatus:(NSString*)marketStatus{
    _marketStatus = [[SEGUtils ValueToString:marketStatus]copy];
}
- (void)setIsShare:(NSString*)isShare{
    _isShare = [[SEGUtils ValueToString:isShare]copy];
}
- (void)setContent:(NSString*)content{
    _content = [[SEGUtils ValueToString:content]copy];
}
- (void)setIsPraise:(NSString*)isPraise{
    _isPraise = [[SEGUtils ValueToString:isPraise]copy];
}
- (void)setPgcType:(NSString*)pgcType{
    _pgcType = [[SEGUtils ValueToString:pgcType]copy];
}

- (void)setChannelId:(NSString *)channelId
{
    _channelId = [[SEGUtils ValueToString:channelId] copy];
}
- (void)setChannelName:(NSString *)channelName
{
    _channelName = [[SEGUtils ValueToString:channelName] copy];
}
@end
